package vt.transit.server.services;

import java.util.List;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;

import vt.transit.server.data.BusStop;
import vt.transit.server.data.BusStopCrime;
import vt.transit.server.data.CrimeInstance;
import vt.transit.server.data.MetroStop;
import vt.transit.server.data.MetroStopCrime;

@Path("/mobile")
public interface MobileServices {

	@GET
	@Path("/test")
	@Produces("application/json")
	String test();
	
	@GET
	@Path("/test_postgis")
	@Produces("application/json")
	int getNumCrimes();
	
	@GET
	@Path("/test_json")
	@Produces("application/json")
	List<CrimeInstance> getAllCrimeInstances();
	
	@GET
	@Path("/crimes")
	@Produces("application/json")
	List<CrimeInstance> getAllCrimesNearby(
			@QueryParam("lat") double lat, 
			@QueryParam("lon") double lon, 
			@QueryParam("radius") double radius);
	
	@GET
	@Path("/railstops")
	@Produces("application/json")
	List<MetroStop> getAllMetroStopsNearby(
			@QueryParam("lat") double lat, 
			@QueryParam("lon") double lon, 
			@QueryParam("radius") double radius);
	
	@GET
	@Path("/busstops")
	@Produces("application/json")
	List<BusStop> getAllBusStopsNearby(
			@QueryParam("lat") double lat, 
			@QueryParam("lon") double lon, 
			@QueryParam("radius") double radius);
	
	@GET
	@Path("/railcrime")
	@Produces("application/json")
	List<MetroStopCrime> getRailCrimeStats(
			@QueryParam("lat") double lat, 
			@QueryParam("lon") double lon, 
			@QueryParam("count") int count);
	
	@GET
	@Path("/buscrime")
	@Produces("application/json")
	List<BusStopCrime> getBusCrimeStats(
			@QueryParam("lat") double lat, 
			@QueryParam("lon") double lon, 
			@QueryParam("count") int count);
	
}
